========================================
  Telegram Bot – RawIntel Lookup
  Setup Instructions
========================================

[1] Prerequisites
-----------------
- A VPS (Ubuntu/Debian) with Python 3.9+ installed.
- Your Telegram bot token (from @BotFather).
- Your RawIntel API key (from your dashboard).

[2] Download the bot code
--------------------------
- Download the Python script from:
  https://rawintel.net/static/downloads/telegram_bot.py
  (or use wget on your VPS)

Example:
  wget https://rawintel.net/static/downloads/telegram_bot.py

[3] Install dependencies
------------------------
  pip install python-telegram-bot requests

(It is recommended to use a virtual environment)
  python3 -m venv venv
  source venv/bin/activate
  pip install python-telegram-bot requests

[4] Edit the script with your tokens
-------------------------------------
  nano telegram_bot.py

Look for these lines and replace with your actual tokens:
  BOT_TOKEN = "your_telegram_bot_token_here"
  API_KEY = "your_rawintel_api_key_here"

Save (Ctrl+X, Y, Enter).

[5] Run the bot (keep alive with systemd)
------------------------------------------
Test manually:
  python telegram_bot.py

If it works, stop with Ctrl+C and create a systemd service:

  sudo nano /etc/systemd/system/rawintel-telegram.service

Paste:
[Unit]
Description=RawIntel Telegram Bot
After=network.target

[Service]
User=root
WorkingDirectory=/root
ExecStart=/usr/bin/python3 /root/telegram_bot.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Then:
  sudo systemctl daemon-reload
  sudo systemctl enable rawintel-telegram
  sudo systemctl start rawintel-telegram
  sudo systemctl status rawintel-telegram

[6] Using the bot
-----------------
Start a chat with your bot on Telegram.
Send /lookup <Discord ID>

[7] Updating
-------------
  nano telegram_bot.py   (edit the file)
  sudo systemctl restart rawintel-telegram 